﻿using IM.Easy.Core.AppContext;
using IM.Easy.Core.Route;
using IM.Easy.SystemServices.IServices;
using IM.Easy.SystemServices.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Diagnostics;

namespace IM.Easy.Api.Controllers.System
{
    //[Route("api/[controller]")]
    //[ApiController]
    //[ApiExplorer]
    public class SystemController : ControllerBase
    {
        private readonly IHttpContextAccessor httpContextAccessor;
        private readonly IConfiguration configuration;
        private readonly IUserContext userContext;
        public SystemController(IConfiguration configuration, IHttpContextAccessor httpContextAccessor, IUserContext userContext)
        {
            this.configuration = configuration;
            this.httpContextAccessor = httpContextAccessor;
            this.userContext = userContext;
        }
        //[HttpGet("test/{id}")]
        //[AllowAnonymous]
        public string GetDescription()
        {
            var id = HttpContext.Connection.Id;
            return $"{id},{HttpContext.TraceIdentifier}";
            //return "系统描述";
        }

        public void GetConfig()
        {
            var mm = configuration;
        }

        //public void PostDescription([FromBody] long id)
        //{

        //}

        //[HttpPost("route/{id}")]
        //public void Get()
        //{

        //}
    }
}
